package org.kailu.book.service;

import java.util.List;

import org.kailu.book.DAO.ExportBookDetailsDAO;
import org.kailu.book.entity.ExportBookDetailsEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class ExportBookDetailsService {

	@Autowired
	private ExportBookDetailsDAO exportBookDetailsDAO;
	
	@Transactional
	public void save(ExportBookDetailsEntity exportEntity) {
		this.exportBookDetailsDAO.save(exportEntity);
	}
	
	@Transactional
	public List<ExportBookDetailsEntity> getAll() {
		return this.exportBookDetailsDAO.getAll();
	}
	
	@Transactional
	public ExportBookDetailsEntity get(int id) {
		return this.exportBookDetailsDAO.get(id);
	}
	
	@Transactional
	public List<ExportBookDetailsEntity> getByExportId(int export_id) {
		return this.exportBookDetailsDAO.getByExportId(export_id);
	}
	
	@Transactional
	public void delete(int id) {
		this.exportBookDetailsDAO.delete(id);
	}
}
